package com.kuyun.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.kuyun.entity.Video;
import com.kuyun.service.VideoService;


@Controller
@RequestMapping("/")
public class VideoControlller {
	
	@Autowired
	private VideoService videoService;
	
	@RequestMapping("/video")
	@ResponseBody
	public Object toVideo(ModelMap modelMap) {
		System.out.println("进入toVide方法：*************");
		List<Video> VideoList=videoService.findAllVideo();
		modelMap.put("videolist", VideoList);
		return VideoList;
	}
}
